package com.xbongbong.saas.model;

import com.xbongbong.saas.domain.entity.BatchSurplusRecordEntity;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface BatchSurplusRecordModel {
    /**
     * 入库单产品数据插入
     * @param stockSurplusRecordEntity 供应商实体
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @return Integer
     */
    Integer insert(BatchSurplusRecordEntity stockSurplusRecordEntity);
    /**
     * 入库单产品数据更新
     * @param stockSurplusRecordEntity 供应商实体
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @return Integer
     */
    Integer update(BatchSurplusRecordEntity stockSurplusRecordEntity);

    /**
     * 根据索引查询数据
     *
     * @param param 查询参数
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @return List<ProductEntityExt>
     **/
    List<BatchSurplusRecordEntity> findEntitys(Map<String, Object> param);

    Integer save(BatchSurplusRecordEntity stockSurplusRecordEntity);

    void insertBatch(List<BatchSurplusRecordEntity> stockSurplusRecordEntityList);

    List<BatchSurplusRecordEntity> getLatestFlowBillByBatchKey(String corpid, Set<String> batchKeySet, Long dateTime);

    /**
     * 批量更新
     * @author 吴峰
     * @date 2019/3/4 20:03
     * @param list 更新的数据
     * @param corpid 公司id
     * @return java.lang.Integer
     */
    void updateBatch(List<BatchSurplusRecordEntity> list, String corpid);

    void deleteAllByCorpId(String corpid);

    void insertRecordsFromBatchStock(String corpid, Long monthBeforeInt);

    void deleteByAddTime(Map<String, Object> param);

    void batchInsertRecordsFromBatchStock(Map<String, Object> param);
}
